package com.mj.mes.system.SysMechanics;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by Administrator on 2017/8/21.
 */
public interface SysMechanicsDao extends JpaRepository<SysMechanics,Long>,JpaSpecificationExecutor<SysMechanics> {
    @Query("select u from  SysMechanics u where u.deviceName=:name")
    SysMechanics findBySysDeviceName(@Param("name") String deviceName);

    SysMechanics findByDevicePosition(String devicePosition);
}
